<template>
    <div @click="show">自定义的组件</div>
</template>
<script>
export default {
    data(){
        return {
            content: '点击时出现的内容'
        }
    },
    methods: {
        show(){
            console.log(this.content);
        }
    }
}
</script>
<style scoped>
    div{
        color: yellow
    }
</style>